package com.pzhu.acargid.until;

import lombok.AllArgsConstructor;
import lombok.NoArgsConstructor;

@lombok.Data
@AllArgsConstructor
@NoArgsConstructor
public class Result<T> {
    private Integer code;
    private T data;
    private String message;

    public static Result success(Object data) {
        return new Result<>(1, data, "操作成功");
    }

    public static Result failure(Object data) {
        return new Result<>(0, data, "操作失败");
    }
}
